package com.ruoyi.order.domain;

import java.math.BigDecimal;
import java.util.Date;


import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * 订单列表对象 tb_order
 *
 * @author ruoyi
 * @date 2025-08-02
 */
@Document(indexName = "es_order",shards = 1,replicas = 0)
public class TbOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @Id
    @Field(type = FieldType.Long)
    private Long orderId;

    /**
     * 订单编号
     */
    @Excel(name = "订单编号")
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String orderNo;

    /**
     * 订单
     */
    @Excel(name = "订单")
    @Field(type = FieldType.Long)
    private Long orderStatus;

    /**
     * 订单金额
     */
    @Excel(name = "订单金额")
    @Field(type = FieldType.Double)
    private BigDecimal orderAmount;

    /**
     * 支付时间
     */
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    @Field(type = FieldType.Date,format = {}, pattern = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    /**
     * 订单类型
     */
    @Excel(name = "订单类型")
    @Field(type = FieldType.Long)
    private Long orderType;

    /**
     * 用户ID
     */
    @Excel(name = "用户ID")
    @Field(type = FieldType.Long)
    private Long userId;

    /**
     * 商品信息
     */
    @Excel(name = "商品信息")
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String prodInfo;

    /**
     * $column.columnComment
     */
    private Long groupId;

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderStatus(Long orderStatus) {
        this.orderStatus = orderStatus;
    }

    public Long getOrderStatus() {
        return orderStatus;
    }

    public void setOrderAmount(BigDecimal orderAmount) {
        this.orderAmount = orderAmount;
    }

    public BigDecimal getOrderAmount() {
        return orderAmount;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setOrderType(Long orderType) {
        this.orderType = orderType;
    }

    public Long getOrderType() {
        return orderType;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setProdInfo(String prodInfo) {
        this.prodInfo = prodInfo;
    }

    public String getProdInfo() {
        return prodInfo;
    }

    public void setGroupId(Long groupId) {
        this.groupId = groupId;
    }

    public Long getGroupId() {
        return groupId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("orderId", getOrderId())
                .append("orderNo", getOrderNo())
                .append("orderStatus", getOrderStatus())
                .append("orderAmount", getOrderAmount())
                .append("payTime", getPayTime())
                .append("orderType", getOrderType())
                .append("userId", getUserId())
                .append("prodInfo", getProdInfo())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("groupId", getGroupId())
                .toString();
    }
}
